/*
 Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 SPDX-License-Identifier: Apache-2.0
*/

@use '../internal/styles' as styles;
@use '../internal/styles/tokens' as awsui;

.root {
  /* used for backwards-compatibility with older versions of test-utils */
}

.radio-group {
  @include styles.styles-reset;

  &:not(.horizontal-group) {
    display: block;
  }

  &.horizontal-group {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: awsui.$space-scaled-l;
  }
}

.radio + .radio:not(.horizontal) {
  margin-block-start: awsui.$space-scaled-xxs;
}

.radio--has-description + .radio:not(.horizontal) {
  margin-block-start: awsui.$space-scaled-xs;
}

.radio.horizontal {
  // Leaves approximately up to 80 characters for the description before wrapping.
  // This is the usually recommended maximum to keep text columns readable.
  max-inline-size: calc(16 * #{awsui.$space-scaled-xxl});
}
